Skip to content

Adiabatic expansion test ICs and documentation#471

Open
brantr wants to merge 2 commits intodevfrom
Adiabatic-Expansion-Test
Open

Adiabatic expansion test ICs and documentation#471
brantr wants to merge 2 commits intodevfrom
Adiabatic-Expansion-Test

Conversation

@brantr
Copy link
Collaborator

@brantr brantr commented Feb 5, 2026

I've created a simple adiabatic expansion test for an expanding cosmological frame. It simply populates a grid with the critical density in baryons and evolves the density and temperature adiabatically. There is no initial velocity in the gas, and no particle distribution.

I created a RTD entry for the 3D Adiabatic Expansion test. I confirm that the test runs successfully using dev.

I created a RTD entry for the 3D Adiabatic Expansion test. I confirm that the test runs successfully using dev.
@brantr
Copy link
Collaborator Author

brantr commented Feb 6, 2026

pre-commit.ci autofix

// temp = T_init * pow( dens/rho_0, 2./3.);
// U = temp / (gamma-1) / MP * KB * 1e-10 * dens;
// E = 0.5*dens*vel*vel + U;

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these additions in the Zeldovich Pancake ICs intentional?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(It's possible git is just confused about which parts of the file have changed, given that below it appears as though the end of the new Adiabatic Expansion test has not been altered, I just want to double-check that this file looks as intended.)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, they are intentional. They reflect how the adiabatic ICs are set. You can remove them if you want, and I can add them back after I am done with testing the Zeldovich test.

Initialize_Sphere(P);
} else if (strcmp(P->init, "Zeldovich_Pancake") == 0) {
Initialize_Zeldovich_Pancake(P);
} else if (strcmp(P->init, "Adiabatic_Expansion") == 0) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume these modifications to the particles ICs are only necessary because the cosmology make-type by default includes particles?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, in tests I tried to compile the code with cosmology and without particles and the compilation failed.

@evaneschneider
Copy link
Collaborator

CI tests are running now, but this looks good to merge once everything passes. (I have to trigger the tests manually for PRs outside of Pitt, since they run on the CRC hardware.) Thanks very much for adding the documentation for the test! Let me know if you'd like us to add it as a system test in the future - right now the only cosmology system test we have is a full cosmological simulation that as far as I know has never been verified.

@brantr
Copy link
Collaborator Author

brantr commented Feb 6, 2026

Thanks. I plan to revise and test the cosmological simulation test as well. We can add as a system test in the future, but I may revise this test depending on the outcome of the Zeldovich test (I may add a bulk velocity to check its evolution with scale factor).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants